package com.jade.linkong.service.impl;

import com.jade.common.core.text.Convert;
import com.jade.common.utils.DateUtils;
import com.jade.linkong.domain.LkProcessTaskFill;
import com.jade.linkong.mapper.LkProcessTaskFillMapper;
import com.jade.linkong.service.ILkProcessTaskFillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 进度填报Service业务层处理
 * 
 * @author jade
 * @date 2020-08-07
 */
@Service
public class LkProcessTaskFillServiceImpl implements ILkProcessTaskFillService 
{
    @Autowired
    private LkProcessTaskFillMapper lkProcessTaskFillMapper;

    /**
     * 查询进度填报
     * 
     * @param taskId 进度填报ID
     * @return 进度填报
     */
    @Override
    public LkProcessTaskFill selectLkProcessTaskFillById(Long taskId)
    {
        return lkProcessTaskFillMapper.selectLkProcessTaskFillById(taskId);
    }

    /**
     * 查询进度填报列表
     * 
     * @param lkProcessTaskFill 进度填报
     * @return 进度填报
     */
    @Override
    public List<LkProcessTaskFill> selectLkProcessTaskFillList(LkProcessTaskFill lkProcessTaskFill)
    {
        return lkProcessTaskFillMapper.selectLkProcessTaskFillList(lkProcessTaskFill);
    }

    /**
     * 新增进度填报
     * 
     * @param lkProcessTaskFill 进度填报
     * @return 结果
     */
    @Override
    public int insertLkProcessTaskFill(LkProcessTaskFill lkProcessTaskFill)
    {
        lkProcessTaskFill.setCreateTime(DateUtils.getNowDate());
        return lkProcessTaskFillMapper.insertLkProcessTaskFill(lkProcessTaskFill);
    }

    /**
     * 修改进度填报
     * 
     * @param lkProcessTaskFill 进度填报
     * @return 结果
     */
    @Override
    public int updateLkProcessTaskFill(LkProcessTaskFill lkProcessTaskFill)
    {
        lkProcessTaskFill.setUpdateTime(DateUtils.getNowDate());
        return lkProcessTaskFillMapper.updateLkProcessTaskFill(lkProcessTaskFill);
    }

    /**
     * 删除进度填报对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLkProcessTaskFillByIds(String ids)
    {
        return lkProcessTaskFillMapper.deleteLkProcessTaskFillByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除进度填报信息
     * 
     * @param taskId 进度填报ID
     * @return 结果
     */
    @Override
    public int deleteLkProcessTaskFillById(Long taskId)
    {
        return lkProcessTaskFillMapper.deleteLkProcessTaskFillById(taskId);
    }
}
